package com.yingxin.yxerp.module.dingtalk.entity.enums;

/**
 * 政治面貌
 */

public enum WeComPoliticalOutlook {

    ONE(1,"团员"),
    TWO(2,"党员"),
    THREE(3,"群众"),
    FOUR(4,"其他");

    private Integer politicalOutlook;

    private String politicalOutlookName;

    WeComPoliticalOutlook(Integer politicalOutlook, String politicalOutlookName) {
        this.politicalOutlook = politicalOutlook;
        this.politicalOutlookName = politicalOutlookName;
    }

    public Integer getPoliticalOutlook() {
        return politicalOutlook;
    }

    public void setPoliticalOutlook(Integer politicalOutlook) {
        this.politicalOutlook = politicalOutlook;
    }

    public String getPoliticalOutlookName() {
        return politicalOutlookName;
    }

    public void setPoliticalOutlookName(String politicalOutlookName) {
        this.politicalOutlookName = politicalOutlookName;
    }

    public static WeComPoliticalOutlook getEnum(Integer politicalOutlook) {
        if( politicalOutlook == null ){
            return null;
        }
        for (WeComPoliticalOutlook i : WeComPoliticalOutlook.values()) {
            if ( i.getPoliticalOutlook() == politicalOutlook ) {
                return i;
            }
        }
        return null;
    }

}
